function res = multitra(fun,xl,xr,n)
% MULTITRA - 用复合梯形公式求fun的从xl到xr的积分
%  
%  

h = (xr-xl)/n;
points = xl:h:xr;
F = fun(points);
FF = F(1:n)+F(2:(n+1));
res = h/2*sum(FF);
end